package com.rest;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import com.sun.jersey.core.header.FormDataContentDisposition;
import com.sun.jersey.multipart.FormDataParam;

@Path("/services")
public interface ServicesService {

	@GET
	@Path("/")
	@Produces(MediaType.APPLICATION_JSON)
	List<ApiServices> getServices();

	@GET
	@Path("/service")
	@Produces(MediaType.APPLICATION_JSON)
	ApiRestService getService(@QueryParam("api") String api, @QueryParam("service") String request);

	@GET
	@Path("/version")
	@Produces(MediaType.APPLICATION_JSON)
	String getVersion();

	@POST
	@Path("/update")
	@Consumes(MediaType.MULTIPART_FORM_DATA)
	String updateServices(@NotNull @FormDataParam("apiFile") InputStream inputStream,
			@FormDataParam("apiFile") FormDataContentDisposition fileDetail);

	@GET
	@Path("/enums")
	@Produces(MediaType.APPLICATION_JSON)
	Map<String, List<ApiEnum>> getEnumerations();
}
